32 research outputs found

    A New Lower Bound on the Maximum Number of Satisfied Clauses in Max-SAT and its Algorithmic Applications

    Full text link
    A pair of unit clauses is called conflicting if it is of the form (x)(x), (xˉ)(\bar{x}). A CNF formula is unit-conflict free (UCF) if it contains no pair of conflicting unit clauses. Lieberherr and Specker (J. ACM 28, 1981) showed that for each UCF CNF formula with mm clauses we can simultaneously satisfy at least \pp m clauses, where \pp =(\sqrt{5}-1)/2. We improve the Lieberherr-Specker bound by showing that for each UCF CNF formula FF with mm clauses we can find, in polynomial time, a subformula F′F' with m′m' clauses such that we can simultaneously satisfy at least \pp m+(1-\pp)m'+(2-3\pp)n"/2 clauses (in FF), where n"n" is the number of variables in FF which are not in F′F'. We consider two parameterized versions of MAX-SAT, where the parameter is the number of satisfied clauses above the bounds m/2m/2 and m(5−1)/2m(\sqrt{5}-1)/2. The former bound is tight for general formulas, and the later is tight for UCF formulas. Mahajan and Raman (J. Algorithms 31, 1999) showed that every instance of the first parameterized problem can be transformed, in polynomial time, into an equivalent one with at most 6k+36k+3 variables and 10k10k clauses. We improve this to 4k4k variables and (25+4)k(2\sqrt{5}+4)k clauses. Mahajan and Raman conjectured that the second parameterized problem is fixed-parameter tractable (FPT). We show that the problem is indeed FPT by describing a polynomial-time algorithm that transforms any problem instance into an equivalent one with at most (7+35)k(7+3\sqrt{5})k variables. Our results are obtained using our improvement of the Lieberherr-Specker bound above

    Demeter interfaces: Adaptive programming without surprises

    No full text
    Abstract. Adaptive Programming (AP) allows for the separate definition of data structures and traversals with attached computations, performed during the traversal, that operate on these data structures. The loosely defined contexts, structure and computation, are composed according to a given traversal specification. Traversal specifications are defined against a graph-based model of the underlying data structure with the ability to abstract over graph node names, edges and subpaths. As such certain modifications to the data structure can be made without altering the programs overall behavior. The program adapts, or more precisely the computation can withstand, modifications to its underlying data structure. Currently AP systems, i.e. DAJ, provide no mechanisms to warn or even guard against modifications that will affect the meaning of a program. Programmers have to depend on thorough (or even exhaustive) testing in order to detect such modifications. In this paper we present Demeter Interfaces, through which a more thorough design method of adaptive programs allows for more resilient software. Demeter Interfaces specify the expected structural properties of the underlying data structure that must hold in order for adaptive code to function correctly. Through an example we illustrate the usage and implementation of Demeter Interfaces. We further show how Demeter Interfaces result in better designs of adaptive programs, ease of adaptive code reuse and how they promote parallel development. We also discuss the applicability of Demeter Interfaces to XML technologies making our results relevant to large communities, such as the XQuery, XLinq and XSLT communities.

    Contributions to teaching object-oriented design and programming

    No full text

    Aspect-oriented programming with adaptive methods

    No full text

    Compositional and Relational Reasoning During Class Abstraction

    No full text

    Pointcuts as Functional Queries

    No full text
    Abstract. Most aspect-oriented languages provide only a fixed, built-in set of pointcut designators whose denotation is only described informally. As a consequence, these lan-guages do not provide operations to manipulate or reason about pointcuts beyond weav-ing. In this paper, we investigate the usage of the functional query language XQuery for the specification of pointcuts. Due to its abstraction and module facilities, XQuery enables powerful composition and reusability mechanisms for pointcuts.

    Walk Your Tree Any Way You Want

    Get PDF
    Software transformations in the Nuthatch style are described as walks over trees (possibly graphs) that proceed in programmerdefined steps which may observe join points of the walk, may observe and affect state associated with the walk, may rewrite the walked tree, may contribute to a built tree, and must walk somewhere, typically along one branch or another. The approach blends well with OO programming. We have implemented the approach in the Nuthatch/J library for Java
    corecore